/* eslint-disable @typescript-eslint/no-explicit-any */

//防抖
export const debounce = (fn: any, timeout = 1000) => {
    let timer: any = null
    return () => {
        if (timer) clearInterval(timer)
        timer = setInterval(() => {
            fn()
        }, timeout)
    }
}